import 'package:flutter/material.dart';
import 'package:syn_4s/core/extension/int_extension.dart';

class AppTheme {
  static double bodyFontSize = 14.px;
  static double smallFontSize = 12.px;
  static double normalFontSize = 20.px;
  static double largeFontSize = 22.px;

  static const Color norTextColors = Colors.black;
  static const Color infoTextColors = Color.fromRGBO(16, 16, 16, 1);
  static const Color toastBgColors = Color.fromRGBO(0, 0, 0, 0.5);
  static const Color backgroundColors = Color.fromRGBO(190, 210, 233, 1);
  static const Color sixColor = Color.fromRGBO(102, 102, 102, 1);
  static const Color threeColor = Color.fromRGBO(51, 51, 51, 1);
  static const Color nineColor = Color.fromRGBO(153, 153, 153, 1);
  static const Color bgGreyColor = Color.fromRGBO(246, 249, 251, 1);
  static const Color hintTextColor = Color.fromRGBO(128, 128, 128, 1);
  static const Color unEnableColor = Color.fromRGBO(217, 220, 217, 1);
  static const Color loginContentColor = Color.fromRGBO(189, 212, 232, 1);
  static const Color orangeColor = Color.fromRGBO(245, 130, 31, 1);
  static const Color loginTextColor = Color.fromRGBO(18, 27, 42, 1);
  static const Color appBarStartColor = Color.fromRGBO(51, 63, 115, 1);
  static const Color appBarEndColor = Color.fromRGBO(32, 38, 70, 1);
  static const Color bgStartColor = Color.fromRGBO(11, 50, 86, 1);
  static const Color bgEndColor = Color.fromRGBO(33, 39, 72, 1);
  static const Color redColor = Color.fromRGBO(207, 70, 75, 1);
  static const Color textColor = Color.fromRGBO(73, 50, 133, 1);
  static const Color titleStartColor = Color.fromRGBO(238, 68, 34, 1);
  static const Color titleEndColor = Color.fromRGBO(234, 122, 27, 1);
  static const Color yellowColor = Color.fromRGBO(255,251,213,1);
  static const Color greenColor = Color.fromRGBO(54,179,77,1);
  static const Color drawerStartColor = Color.fromRGBO(240,67,30,1);
  static const Color drawerEndColor = Color.fromRGBO(242,130,29,1);
  static const Color greyShadowColor = Color.fromRGBO(99,111,123,0.65);
  static const Color warningColor = Color.fromRGBO(219,37,43,1);
  static const Color unsafeActColor = Color.fromRGBO(129,143,159,1);
  static const Color borderColor = Color.fromRGBO(239,239,239,1);

  static final ThemeData norTheme = ThemeData(
      colorScheme: const ColorScheme(
          brightness: Brightness.light,
          primary: backgroundColors,
          onPrimary: Colors.white,
          secondary: backgroundColors,
          onSecondary: Colors.white,
          error: Colors.red,
          onError: Colors.white,
          surface: Colors.white,
          onSurface: Colors.black),
      textTheme: TextTheme(
        headlineMedium: TextStyle(fontSize: normalFontSize,color: norTextColors,fontFamily: 'MHeiHK'),
        headlineSmall: TextStyle(fontSize: smallFontSize,color: norTextColors,fontFamily: 'MHeiHK'),
        headlineLarge: TextStyle(fontSize: largeFontSize,color: norTextColors,fontFamily: 'MHeiHK'),
        bodyMedium: TextStyle(fontSize: bodyFontSize,color: textColor,fontFamily: 'MHeiHK'),
        displayMedium: TextStyle(fontSize: normalFontSize,color: norTextColors,fontFamily: 'MHeiHK'),
        displaySmall: TextStyle(fontSize: smallFontSize,color: norTextColors,fontFamily: 'MHeiHK'),
        displayLarge: TextStyle(fontSize: largeFontSize,color: norTextColors,fontFamily: 'MHeiHK'),
      ),
      scaffoldBackgroundColor: Colors.white,
      appBarTheme: AppBarTheme(
          centerTitle: true,
          elevation: 0,
          titleTextStyle: TextStyle(fontSize: 20.px),
          foregroundColor: Colors.white,
          backgroundColor: Colors.transparent));

  // 暗黑
  static const Color darkTextColors = Colors.green;

  static final ThemeData darkTheme = ThemeData(
      colorScheme: const ColorScheme(
          brightness: Brightness.dark,
          primary: Colors.yellow,
          onPrimary: Colors.yellow,
          secondary: Colors.yellow,
          onSecondary: Colors.yellow,
          error: Colors.red,
          onError: Colors.redAccent,
          surface: Colors.grey,
          onSurface: Colors.white),
      textTheme: TextTheme(
          bodyMedium:
              TextStyle(fontSize: normalFontSize, color: darkTextColors)));
}
